﻿using Gp.Scripts.Core;
using Gp.Scripts.Equip;

namespace Gp.Scripts.Data.Equip.Impl {
    [WeaponPhrase("动力循环", "如果本轮次内成功造成伤害，则将充能效果保留至下回合")]
    public class PersistChargingPhrase : WeaponPhraseDecorator {
        public override bool AfterAttack(BaseUnit target, AttackActionResult atkResult) {
    
            if (atkResult.DamageMake <= 0) {
                return false;
            }
    
            // if (this.Entity.Info is not MeleeWeaponInfo {isCharged: true} melee) {
            //     return false;
            // }
            
            
            TextEffect(Unit, "动力循环");
            // melee.KeepCharged = true;
    
            return true;
        }
    }
}